package com.dogstudio.mygame.config;

import android.graphics.Color;

/**
 * Card背景色
 */

public class GameColor {
    /**
     * 获取Card对应数字的背景色
     */
    public static int getCardBgColor(int number) {
        String mBgColor = "#EA7821";
        switch (number) {
            case 0:
                mBgColor = "#CCC0B3";
                break;
            case 2:
                mBgColor = "#EEE4DA";
                break;
            case 4:
                mBgColor = "#EDE0C8";
                break;
            case 8:
                mBgColor = "#F2B179";
                break;
            case 16:
                mBgColor = "#F49563";
                break;
            case 32:
                mBgColor = "#F5794D";
                break;
            case 64:
                mBgColor = "#F55D37";
                break;
            case 128:
                mBgColor = "#EEE863";
                break;
            case 256:
                mBgColor = "#EDB04D";
                break;
            case 512:
                mBgColor = "#ECB04D";
                break;
            case 1024:
                mBgColor = "#EB9437";
                break;
            case 2048:
                mBgColor = "#EA7821";
                break;
            default:
                mBgColor = "#EA7821";
                break;
        }
        return Color.parseColor(mBgColor);
    }

    /**
     * 获取Card对应数字的文字颜色
     */
    public static int getCardFontColor(int number) {
        String fontColor = "#776E65";
        if (number >= 8) {
            fontColor = "#FFFFFF";
        }
        return Color.parseColor(fontColor);
    }

}
